package com.dt.dubai.mall.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;


/*
 * 商品后台分类表
 */

@Data
@Table(name = "dt_mall_admin_category")
@EqualsAndHashCode(callSuper = false)
public class MallAdminCategoryEntity extends BaseEntity {

    //类型 1-电商,2-检测,3-计量
    Short commodityType;

    //分类等级
    @NotNull(message = "level参数不能为空")
    Long level;

    //父级id
    @NotNull(message = "parentId参数不能为空")
    Long parentId;

    //分类名称
    @NotNull(message = "categoryName参数不能为空")
    @Length(min = 0, max = 30, message = "categoryName参数最大长度不30")
    String categoryName;

    //分类别名称
    @Length(min = 0, max = 30, message = "categoryAliasName参数最大长度不30")
    String categoryAliasName;


}
